extends "../changchun-1/changchun-1.gd"

var missileCap = 10
func _extInit():
	._extInit()
	lv = 2
	addSkill("每{cd}秒发射1枚所装载的导弹，直到耗尽，初始装载10枚上游-1导弹(200技能伤害，\n受雷击加成)", "导弹装载", "missileLoad", 8)

func _onBattleStart():
	._onBattleStart()
	missileCap = 10

func _castCdSkill(id):
	._castCdSkill(id)
	if id=="missileLoad" and aiCha != null and missileCap > 0:
		missileLoad()

func missileLoad(cha = aiCha):
	missileCap -= 1
	utils.createSkillTextEff("导弹装载", position)
	#TODO 特效
	createFlyEff(sprcPos, cha, "sk_4_1_2")
	azurHurtChara(cha, 200*(1 + att.torpedo), sys.HurtType.WEAPON, sys.AtkType.SKILL, "导弹")


